import { MenuDataItem } from '@ant-design/pro-layout';
import { RenderSetting } from '@ant-design/pro-layout/lib/defaultSettings';
import { IBestAFSRoute } from '@umijs/plugin-layout';

const routes: (MenuDataItem | RenderSetting | IBestAFSRoute)[] = [
  {
    path: '/',
    component: '@/pages/index',
    name: '首页',
    access: 'canReaIndex',
  },
  {
    path: '/tenant',
    name: '模型标识管理',
    routes: [
      {
        path: '/tenant/tenants',
        component: '@/pages/tenant/tenants',
        name: '模型标识管理',
      },
    ],
  },
  {
    path: '/dataset',
    name: '数据集管理',
    routes: [
      {
        path: '/dataset/datasetDetail',
        component: '@/pages/dataset/datasetDetail',
        name: '数据集详情',
      },
      {
        path: '/dataset/pictures',
        component: '@/pages/dataset/pictures',
        name: '总图片详情',
      },
      {
        path: '/dataset/dataset_pictures',
        component: '@/pages/dataset/dataset_pictures',
        name: '数据集图片',
      },
    ],
  },
  {
    path: '/analysis',
    name: '数据分析',
    routes: [
      {
        path: '/analysis/structureData',
        name: '结构化数据',
        routes: [
          {
            path: '/analysis/structureData/dataGraph',
            component: '@/pages/analysis/structureData/dataGraph',
            name: '数据图',
          },
        ],
      },
    ],
  },
  {
    path: '/login',
    component: '@/pages/login',
    name: '登录页',
    hideInMenu: true,
    layout: false,
  },
];

export default routes;
